home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FGL304C.ZIP;1 / EXC.ARJ / FGDOC / EXAMPLES / C / 09-05.C < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-24  |  585 b   |  32 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. void main()
  8. {
  9.    int old_mode, new_mode;
  10.  
  11.    new_mode = fg_bestmode(320,200,1);
  12.    if (new_mode < 0 || new_mode == 12) {
  13.       printf("This program requires a 320 ");
  14.       printf("x 200 color graphics mode.\n");
  15.       exit(1);
  16.       }
  17.  
  18.    old_mode = fg_getmode();
  19.    fg_setmode(new_mode);
  20.  
  21.    fg_move(0,199);
  22.    fg_dispfile("CORAL.SPR",320,0);
  23.    fg_waitkey();
  24.  
  25.    fg_erase();
  26.    fg_dispfile("CORAL.PPR",320,1);
  27.    fg_waitkey();
  28.  
  29.    fg_setmode(old_mode);
  30.    fg_reset();
  31. }
  32.